negotiator.bidding
Class BidDetailsStrictSorterUtility
java.lang.Object
negotiator.bidding.BidDetailsStrictSorterUtility
- All Implemented Interfaces:
- java.util.Comparator<BidDetails>
public class BidDetailsStrictSorterUtility
- extends java.lang.Object
- implements java.util.Comparator<BidDetails>
Comparator which sorts a set of BidDetails based on their utility.
The bid with the highest utility is on the front of the list.
In addition, the ordering is unique: bids with exactly the same utility
are always ordered the same. Use this class ONLY when comparing if two
strategies are equivalent.
- Author:
- Mark Hendrikx
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Comparator |
equals |
BidDetailsStrictSorterUtility
public BidDetailsStrictSorterUtility()
compare
public int compare(BidDetails b1,
BidDetails b2)
- Comperator. If util b1 > b2 then -1, else if < then 1, else
compare hashcodes.
- Specified by:
compare in interface java.util.Comparator<BidDetails>